package com.ruoyi.partybuilding.domain;

import java.util.Date;

import com.easy.query.core.annotation.EasyWhereCondition;
import com.easy.query.core.annotation.Table;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.partybuilding.common.EQuery.ICreatorIdEntity;
import com.ruoyi.partybuilding.common.EQuery.IDeptEntity;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.*;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

/**
 * 评议用户对象 pb_review_user
 * 
 * @author he-liangliang@outlook.com
 * @date 2024-11-27
 */
@Table("pb_review_user")
@Data
public class ReviewUser extends IDeptEntity.LongId implements ICreatorIdEntity.IUserId
{
    private static final long serialVersionUID = 1L;


    /** 评议id ; */
    @ApiModelProperty(value = "评议id")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "评议id")
    @Min(value = 1,message = "评议id错误")
    @NotNull
    private Long reviewId;

    /** 被评议人 ; */
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @ApiModelProperty(value = "被评议人")
    @Excel(name = "被评议人")
    @Min(value = 1,message = "被评议人id错误")
    @NotNull
    private Long reviewedUser;
    @ApiModelProperty(value = "被评议人名称")
    @Excel(name = "被评议人名称")
    private String reviewedUserName;

    /** 被评议人部门 ; */
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @ApiModelProperty(value = "被评议人部门")
    @Excel(name = "被评议人部门")
    private Long reviewedUserDept;

    @ApiModelProperty(value = "被评议人部门名称")
    @Excel(name = "被评议人部门名称")
    private String reviewedUserDeptName;

    /** 评议类型：0互评,1自评，2组织，3群众， ; */
    @ApiModelProperty(value = "评议类型：0互评,1自评，2组织，3群众，")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "评议类型：0互评,1自评，2组织，3群众，")
    private Long type;

    /** 评价人名称 ; */
    @ApiModelProperty(value = "评价人名称")
    @Excel(name = "评价人名称")
    private String userName;

    /** 评价人id ; */
    @ApiModelProperty(value = "评价人id")
    @EasyWhereCondition(type = EasyWhereCondition.Condition.EQUAL)
    @Excel(name = "评价人id")
    private Long userId;

    /** 评价人信息，用于群众评议 ; */
    @ApiModelProperty(value = "评价人信息，用于群众评议")
    @Excel(name = "评价人信息，用于群众评议")
    private String userInfo;

    /** 评定：5优秀 4合格 3基本合格 2不合格 1不定等次 0不了解 ; */
    @ApiModelProperty(value = "评定：5优秀 4合格 3基本合格 2不合格 1不定等次 0不了解")
    @Excel(name = "评定：5优秀 4合格 3基本合格 2不合格 1不定等次 0不了解")
    @Min(value = 1,message = "评定错误")
    @NotNull
    private Long grade;

    /** 评价人部门 ; */
    @ApiModelProperty(value = "评价人部门")
    @Excel(name = "评价人部门")
    private Long deptId;

    /** 评价部门名称 ; */
    @ApiModelProperty(value = "评价部门名称")
    @Excel(name = "评价部门名称")
    private String deptName;

    /**  ; */
    @ApiModelProperty(value = "详情，主要用于组织记录奖惩原因")
    @Excel(name = "", readConverterExp = "")
    private String details;

    /** 组织评议：0无奖励，1奖励 ; */
    @ApiModelProperty(value = "组织评议：0无奖励，1奖励")
    @Excel(name = "组织评议：0无奖励，1奖励")
    private Long result;

    /** 创建时间 ; */
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    @ApiModelProperty("备注")
    String remark;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("reviewId", getReviewId())
            .append("reviewedUser", getReviewedUser())
            .append("reviewedUserDept", getReviewedUserDept())
            .append("type", getType())
            .append("userName", getUserName())
            .append("userId", getUserId())
            .append("userInfo", getUserInfo())
            .append("grade", getGrade())
            .append("deptId", getDeptId())
            .append("deptName", getDeptName())
            .append("details", getDetails())
            .append("result", getResult())
            .append("remark", getRemark())
            .append("createdTime", getCreatedTime())
            .toString();
    }
}
